<template>
  <div class="wrap">
    <div class="head">
      <img src="../assets/logo.png" class="logo" alt="">
      <div class="nav">
        <router-link class="tab" to="/usermanage">
          <img src="../assets/user.png" alt="">
          <img src="../assets/useract.png" alt="">
          <p>用户管理</p>
        </router-link>
        <router-link class="tab" to="/bigData">
          <img src="../assets/data.png" alt="">
          <img src="../assets/dataact.png" alt="">
          <p>数据分析</p>
        </router-link>
        <router-link class="tab" to="/record">
          <img src="../assets/order.png" alt="">
          <img src="../assets/orderact.png" alt="">
          <p>交易记录</p>
        </router-link>
<!--        <router-link class="tab" to="/examine">-->
<!--          <img src="../assets/fk.png" alt="">-->
<!--          <img src="../assets/fkact.png" alt="">-->
<!--          <p>付费审核</p>-->
<!--        </router-link>-->
        <router-link class="tab" to="/logMerage">
          <img src="../assets/log.png" alt="">
          <img src="../assets/logact.png" alt="">
          <p>日志管理</p>
        </router-link>
      </div>
      <div class="user">
        <div>
          <p>超级管理员</p>
          <img src="../assets/admin.png" class="headeravi" alt="">
        </div>
        <el-button type="primary" style="width:80px" size="mini" @click="lginout" round>退出</el-button>
      </div>
    </div>
    <router-view></router-view>
  </div>
</template>
<style lang="scss" scoped>
.wrap {
  width: 1400px;
  margin: 0 auto;
}
.head {
  height: 60px;
  background: #fff;
  border-bottom: 1px solid rgba(229, 229, 229, 1);
  width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  .logo {
    width: 40px;
  }
  .nav {
    display: flex;
    align-items: center;
    height: 50px;
    width: 700px;
    justify-content: space-between;
    margin-top: 10px;
  }
  .tab {
    color: #333;
    text-decoration: none;
    display: block;
    height: 100%;
    width: 100px;
    img {
      width: 22px;
      height: 22px;
      display: block;
      margin: 0 auto;
    }
    img:nth-of-type(1) {
      display: block;
    }
    img:nth-of-type(2) {
      display: none;
    }
    p {
      font-size: 12px;
      margin-top: 6px;
      text-align: center;
      color: #999;
    }
  }
  .router-link-active {
    border-bottom: 2px solid #719bef;
    img:nth-of-type(1) {
      display: none;
    }
    img:nth-of-type(2) {
      display: block;
    }
  }
}
.user {
  display: flex;
  align-items: center;
  div {
    display: flex;
    align-items: center;
    margin-right: 30px;
    p {
      color: #555;
      font-size: 16px;
      margin-right: 8px;
    }
    .headeravi {
      display: block;
      width: 30px;
      height: 30px;
      border-radius: 50%;
    }
  }
}
</style>

<script>
export default {
  methods: {
    lginout() {
      this.$confirm("是否退出当前账号", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      })
        .then(() => {
          console.log(9)
          this.$router.push("/login");
          localStorage.removeItem("admin");
        })
        .catch(() => {});
    }
  }
};
</script>

